package main

import (
	"encoding/json"
	"fmt"
)

type Movie struct {
	Title  string   `json:"title`
	Year   int      `json:"year`
	Price  int      `json:"rmb`
	Actors []string `json:"actor"`
}



func main() {
	m := Movie{"大雨", 2019, 9, []string{"liu1", "zhang2"}}
	jsonStr, err := json.Marshal(m)
	if err != nil {
		fmt.Println("err:", err)
		return
	}
	fmt.Printf("jsonStr= %s", jsonStr)
}
